# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Jenneron <jenneron@protonmail.com>
pkgname=device-lenovo-yoga-5g
pkgdesc="Lenovo Yoga 5G"
pkgver=3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	linux-postmarketos-qcom-sc8180x>=6.6.0
	postmarketos-base
	soc-qcom-sc8180x
	systemd-boot
"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="WiFi firmware"
	depends="firmware-lenovo-yoga-5g linux-firmware-ath10k soc-qcom-sc8180x-nonfree-firmware"
	mkdir "$subpkgdir"
}


sha512sums="
7601e33a77407ddb6e9745242f4a4df108943040e69dc33286d809e4f6ad45f8aeba2012dbdd5ec1b3bcb841776e19c6df5cace3c8465ef26e2a4ac04cb0697d  deviceinfo
438f30d14ad15fa87e5fa3b5127e5430af35cdddc400d2a01acbba6487792a602fcf3400e2c42ee991e6785fe62b083030ea977292efa88dacb3fcbe03bc32d7  modules-initfs
"
